package com.example.demo.utils;

import java.io.*;

public class Word2pdfUtil {


//    public static void word2pdf() {
//        File inputWord = new File("D:/test.docx");
//        File outputFile = new File("D:/test.pdf");
//        try  {
//            InputStream docxInputStream = new FileInputStream(inputWord);
//            OutputStream outputStream = new FileOutputStream(outputFile);
//            IConverter converter = LocalConverter.builder().build();
//            converter.convert(docxInputStream).as(DocumentType.DOCX).to(outputStream).as(DocumentType.PDF).execute();
//            outputStream.close();
//            System.out.println("success");
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }

}
